﻿//-----------------------------------------------------------------------
// <copyright company="Microsoft Corporation">
//     Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Microsoft.DevDiv.Wpf.Samples
{
    using System;

    /// <summary>
    /// Abstraction for setting a value on an IProvideValueTarget
    /// </summary>
    /// <remarks>
    /// IProvideValueTargetSetter will typically keep the target object alive leading to leaks
    /// To prevent leaks clients should either
    ///  x) Dispose the setter when a value is provided or the defered operation is canceled.
    ///  x) Store the setter as a weak reference.
    ///  x) Release references to the setter.
    /// </remarks>
    public interface IProvideValueTargetSetter<T> : IDisposable
    {
        void SetValue(T value);
    }
}
